<template>
  <div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="id" label="ID" width="180"> </el-table-column>
      <el-table-column prop="author" label="作者" width="180">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  created() {
    // 加载新闻列表数据
    this.loadNewsList();
  },
  methods: {
    loadNewsList() {
      this.$axios.get("/api/admin/news?opr=page").then((response) => {
        // 获取到新闻列表数据
        console.log(response.data.data.data);
        this.tableData = response.data.data.data;
      });
    },
  },
  data() {
    return {
      tableData: [],
    };
  },
};
</script>
